package com.sainan114.pipelinestudy.controller;

import com.sainan114.pipelinestudy.PipelineStart;
import org.apache.catalina.Pipeline;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author lgb
 * @Date: 2021/7/10
 */
@Controller
public class PipelineController {
    @Autowired
    PipelineStart pipelineStart;

    @GetMapping("/test")
    @ResponseBody
    public String test(String pipelineName){
        pipelineStart.startPipeline(pipelineName);
        return "success";
    }
}
